var fs = require('fs');
var path = require('path');
var merge = require('merge-stream');
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');

var srcPath = 'layer1/layer2';
function getFolders(dir){
	return fs.readdirSync(dir).filter(function(file){
		return fs.statSync(path.join(dir,file)).isDirectory();
	});
}
console.log(getFolders(srcPath));